package com.me.common.pojo;

/**
 * @描述   定义Point类,用于反射的调用访问
 * @作者   孙毅
 * @日期 2013-5-10 下午7:12:23
 */
public class Point {
	private int x;
	private int y;

	public Point() {
		System.out.println("Point()构造被调用!");
	}

	public Point(int x, int y) {
		System.out.println("Point(x,y)构造被调用!");
		this.x = x;
		this.y = y;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public void showPoint() {
		System.out.println("Point-showPoint()调用!");
		System.out.println("X = " + this.getX());
		System.out.println("Y = " + this.getY());
	}

	// 测试方法
	public void doSomething() {
		System.out.println("Point-doSomething()");
	}

	public void doSomething(String str) {
		System.out.println("Point-doSomething(String)");
		System.out.println("param : " + str);
	}

	public void doSomething(String str, int i) {
		System.out.println("Point-doSomething(String,int)");
		System.out.println("param : " + str);
		System.out.println("param : " + i);
	}

	// 私有方法
	private void doMethod() {
		System.out.println("Point-doMethod()私有方法调用");
	}

	// 带返回值的方法
	public String doReturnMethod() {
		return "Point-doReturnMethod()调用!";
	}

	@Override
	public String toString() {
		return "X = " + x + " , Y = " + y;
	}
}
